Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Functions / Getting and Setting Shape Geometries


GXGetPaths

You can use the GXGetPaths function to determine the geometry of a path shape.

long GXGetPaths(gxShape source, gxPaths *data);
source
A reference to the path shape whose geometry you want to determine.
data
A pointer to a gxPaths structure. The function copies the source shape's geometry into this structure.
function result
The length in bytes of the source shape's geometry.
DESCRIPTION
The GXGetPaths function copies the geometry information from the source path shape into the gxPaths structure pointed to by the data parameter. As the function result, this function returns the length in bytes of the path geometry.

If the source shape is not a path shape, this function posts the error code illegal_type_for_shape.

You may pass nil for the data parameter. In this case, the GXGetPaths function still returns the length of the data, but it does not return the actual data in the data parameter.

Typically, to use this function, you go through the following steps:

  1. Determine the length of the path data by calling this function, passing nil for the data parameter.
  2. Allocate enough memory to hold the path data.
  3. Call this function again, passing a pointer to the allocated memory in the data parameter.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
illegal_type_for_shape(debugging version)
SEE ALSO
For general information about path geometries, see "Path Shapes" on page 2-25.

For the definition of the gxPaths structure, see page 2-107.

To create a new path shape, use the GXNewPaths function, which is described on page 2-117.

To change the geometry of an existing path shape, use the GXSetPaths function, which is described in the next section.

To draw a path geometry without creating a path shape, use the GXDrawPaths function, which is described on page 2-162. To draw a path shape, use the GXDrawShape function, which is described in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help